************************************* * * * * * DUNCAN'S INPUT ANYTHING * * * *THIS ROUTINE IS A SIMPLE MACHINE * *LANGUAGE VERSION OF THE INPUT * *ANYTHING SUBROUTINES. IT ALLOWS * *THE ENTRY OF A STRING VARIABLE * *WITHOUT CHECKING COMMAS, COLONS, * *OR CONTROL CHARACTERS. A * *TERMINATES THE ENTRY. * * TO CALL FROM APPLESOFT BASIC, USE * *THE FOLLOWING TYPE OF CODE: * * * *100 CALL 768,A$ * * * * THIS WILL CALL THE ROUTINE AT * * $0300 (768.) AND RETURN THE * * ENTERED STRING IN THE VARIABLE A$ * * * ************************************* * * * CHKCOM EQU $DEBE ;CHECKS FOR COMMA PTRGET EQU $DFE3 ;GETS VARIABLE NAME CHKSTR EQU $DD6C ;SYNERR <> $ FORPNT EQU $85 ;VARIABLE PNTR INLIN EQU $D52C ;INPUT TO BUFFER BUFHI EQU $02 ;BUFFER = $200 BUFLO EQU $00 RTNCHR EQU $8D ;RETURN CHAR MAKSTR EQU $E3E9 ;MAKE A STRING SAVVAR EQU $DA9A ;SAVE A VARIABLE * * ROUTINE IS RELOCATABLE IF DESIRED * ORG $0300 * * * JSR CHKCOM ;CHECK FOR COMMA JSR PTRGET ;GET VARAIBLE ADDR JSR CHKSTR ;MAKE SURE A STRING STA FORPNT ;STORE ADDR OF STY FORPNT+1 ;STRING FOR LATER JSR INLIN ;GET INPUT STRING LDA #BUFLO ;A,Y -> BUFFER FOR LDY #BUFHI ;MAKSTR, X IS THE LDX #RTNCHR ;END CHARACTER JSR MAKSTR ;INPUT TO STRING JSR SAVVAR ;MOVE TO VARIABLE RTS ;ALL DONE, RETURN